Skip to content

Chaos mode in Realm of Legends - generate valid Commander decks#10224

Open
MostCromulent wants to merge 2 commits intoCard-Forge:masterfrom
MostCromulent:rolchaosfix
Open

Chaos mode in Realm of Legends - generate valid Commander decks#10224
MostCromulent wants to merge 2 commits intoCard-Forge:masterfrom
MostCromulent:rolchaosfix

Conversation

@MostCromulent
Copy link
Copy Markdown
Contributor

@MostCromulent MostCromulent commented Mar 31, 2026

Summary

Closes #10214

Addresses @VigilantSera request in #10214 — Chaos mode generates random 60-card preconstructed decks, incompatible with Realm of Legends' 98-card minimum deck size.

  • Adds allowChaos config flag to ConfigData (default true), consistent with the existing enableGeneticAI flag pattern
  • Gates the Chaos mode in NewGameScene behind this flag, matching how Precon/CommanderPrecon modes are conditionally added
  • Sets allowChaos: false in Realm of Legends' config.json

Notes

  • Backwards compatible: The flag defaults to true, so all other adventures are unaffected. Existing Realm of Legends saves are also unaffected — the flag only controls the new game screen mode picker, not gameplay or save loading.
  • Consistent with existing config options: allowChaos follows the same pattern as enableGeneticAI — a public boolean on ConfigData with a default value, read directly in NewGameScene.

🤖 Generated with Claude Code

Chaos mode generates random 60-card preconstructed decks, which is
incompatible with Realm of Legends' 98-card minimum deck size
requirement. Add an allowChaos config flag (default true) so
individual adventures can opt out. Set it to false for Realm of
Legends.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Hanmac Hanmac requested a review from Simisays March 31, 2026 09:03
@Hanmac Hanmac added the Adventure For the Adventure Module label Mar 31, 2026
@Agetian
Copy link
Copy Markdown
Contributor

Agetian commented Mar 31, 2026

Looks good to me

@Agetian Agetian self-requested a review March 31, 2026 09:13
Agetian
Agetian previously approved these changes Mar 31, 2026
@Jetz72
Copy link
Copy Markdown
Contributor

Jetz72 commented Mar 31, 2026

Would a valid alternative be to just tweak Chaos to generate a valid 100 card random commander deck? I believe we have code for generating those somewhere. Could use the config to specify a deck format for the chaos deck instead of making it a toggle.

@Agetian
Copy link
Copy Markdown
Contributor

Agetian commented Mar 31, 2026

That would indeed be a better (and preferred) implementation 👍

Replace allowChaos toggle with chaosDeckFormat config field. When set to
"Commander", player and enemy decks use DeckgenUtil.generateCommanderDeck()
to produce valid 100-card singleton decks, fixing ROL's 98-card minimum
incompatibility. Adventures without the field keep default precon behavior.
Chaos is also treated as commander-like for the deck editor when configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MostCromulent MostCromulent changed the title Remove Chaos mode option from Realm of Legends Chaos mode in Realm of Legends - generate valid Commander decks Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Adventure For the Adventure Module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Realm of Legends: Remove Chaos Option

4 participants